<?php
declare (strict_types = 1);
namespace app\adminapi\logic\system\organize;
use adminmatrix\server\app\logic\BaseLogic;
use adminmatrix\annotation\Inject;
use think\Request;
use app\adminapi\model\system\organize\AdminPosition;

class PositionLogic extends BaseLogic
{
    #[Inject]
    protected AdminPosition $model;


    public function get(Request $request) : array
    {
        $get = $request->get();
        return (new AdminPosition )
            ->withSearch(array_keys($get) , $get)
            -> field('id , name') -> select() -> toArray();
    }
}